package com.tchy.cloud.entity;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * xmweilove
 * 纬度因子
 */
@Entity
@Table(name = "c_ques_dim", schema = "", catalog = "")
public class CQDimEntity {
    private Integer id;//主键 ques_dim_id

    // private Integer quesId;//量表id  questionnaire_id
    private CQuestionnaireEntity questEntity;

    private String name;//纬度名称 dim_name
    private String dimDesc;//纬度说明 dim_desc
    private String relQues;//关联题号 rel_ques
    private Integer deleted;//是否删除 deleted
    private String formula;//纬度分计算公式
    private Date createTime;//创建时间 create_time


    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "ques_dim_id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "questionnaire_id")
    public CQuestionnaireEntity getQuestEntity() {
        return questEntity;
    }

    public void setQuestEntity(CQuestionnaireEntity questEntity) {
        this.questEntity = questEntity;
    }

    @Basic
    @Column(name = "dim_desc")
    public String getDimDesc() {
        return dimDesc;
    }

    public void setDimDesc(String dimDesc) {
        this.dimDesc = dimDesc;
    }


    @Basic
    @Column(name = "rel_ques")
    public String getRelQues() {
        return relQues;
    }

    public void setRelQues(String relQues) {
        this.relQues = relQues;
    }

    @Basic
    @Column(name = "formula")
    public String getFormula() {
        return formula;
    }

    public void setFormula(String formula) {
        this.formula = formula;
    }


    @Basic
    @Column(name = "dim_name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    @Basic
    @Column(name = "deleted")
    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
